home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 2
/
Atari Mega Archive CD - Volume 2.iso
/
minix
/
up1510b.tgz
/
up1510b
/
src
/
lib
/
posix
/
ctermid.c
< prev
next >
Wrap
C/C++ Source or Header
|
1990-07-23
|
641b
|
31 lines
/* ctermid(3)
*
* Author: Terrence Holm Aug. 1988
*
*
* Ctermid(3) returns a pointer to a string naming the controlling
* terminal. If <name_space> is NULL then local PRIVATE storage
* is used, otherwise <name_space> must point to storage of at
* least L_ctermid characters.
*
* Returns a pointer to "/dev/tty".
*/
#include <lib.h>
#include <string.h>
#include <stdio.h>
#ifndef L_ctermid
#define L_ctermid 9
#endif
char *ctermid(name_space)
char *name_space;
{
PRIVATE char termid[L_ctermid];
if (name_space == (char *)NULL) name_space = termid;
strcpy(name_space, "/dev/tty");
return(name_space);
}